import { createRedisStore } from '@midwayjs/cache-manager';
import { MidwayConfig } from '@midwayjs/core';

export default {
  // use for cookie sign key, should change to your own and keep security
  keys: '1739196841485_137',
  koa: {
    port: 7001,
    globalPrefix: '/api'
  },
  jwt: {
    secret: "test",
    expiresIn: "1d",
  },
  passport: {
    session: false,
  },
  cacheManager: {
    clients: {
      default: {
        store: createRedisStore('default'),
        // options: {
        //   ttl: 10,
        // }
      },
    },
  },
  redis: {
    clients: {
      default: {
        port: 6379, // Redis port
        host: '192.168.1.125', // Redis host
        db: 0,
      }
    },
  },
  cos: {
    // 腾讯云COS配置
    client: {
      SecretId: 'AKIDVt5C8sTr1xgCYhjYAYifR0OZWGm49g5G',
      SecretKey: '2KQIwMZaOyMX1JUWN3YqxkNn23wc5LOJ',
      Bucket: 'fday-1308080822',
      Region: 'ap-shanghai', // 存储桶所在地域
    },
  },
} as MidwayConfig;